﻿using System;
using System.Web;

namespace Common.Web
{
    public static class HttpResponseEx
    {
        public static void SetErrorResponse(this HttpResponse response, Int32 code)
        {
            response.StatusCode = code;
            response.ClearContent();
            response.ClearHeaders();
        }

        public static void SetErrorResponse(this HttpResponse response, Int32 code, String description)
        {
            response.StatusCode = code;
            response.StatusDescription = description;
            response.ClearContent();
            response.ClearHeaders();
        }
    }
}
